package com.commons.validator.controller;

import com.commons.validator.vo.FilmVO;
import com.eksframework.commons.json.EksJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * FilmController
 *
 * @author: chenfenghai
 * @version: 1.0
 * @date: 2021-01-08 15:15
 */
@Slf4j
@RestController
public class FilmController {

    @PostMapping("/save")
    public String save(@Validated @RequestBody FilmVO vo){
        log.debug(EksJson.toJson(vo));
        return "ok";
    }
}
